<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:include href="core\form.xsl"/>
	<xsl:include href="core\level-frame.xsl"/>
	
<xsl:template match="page">
	<xsl:choose>
		<xsl:when test="//page/theme = 1"><xsl:call-template name="page_vert"/></xsl:when>
 		<xsl:otherwise><xsl:call-template name="page_horiz"/></xsl:otherwise>
	</xsl:choose>
</xsl:template>

<xsl:template name="page_vert">
	<table cellspacing="0" cellpadding="0" width="100%">
		<tr>
			<td valign="top">
				<table cellspacing="2" cellpadding="2">
					<xsl:choose>
						<xsl:when test="//page/image/@align='center'">
							<xsl:if test="//page/image and contains(//page/image, 'jpg')">
								<tr>
									<td align="center">
										<img>
											<xsl:attribute name="src"><xsl:value-of select="$media_path"/><xsl:value-of select="image"/></xsl:attribute>
											<xsl:attribute name="align"><xsl:value-of select="image/@align"/></xsl:attribute>
											<xsl:attribute name="alt"><xsl:value-of select="image/@alt"/></xsl:attribute>
											<xsl:attribute name="vspace">10</xsl:attribute>
											<xsl:attribute name="hspace">10</xsl:attribute>
										</img>
									</td>
								</tr>
							</xsl:if>
							<tr><td><xsl:value-of select="info" disable-output-escaping="yes"/></td></tr>
						</xsl:when>
						<xsl:otherwise>
							<tr>
								<td>
									<xsl:if test="//page/image and contains(//page/image, 'jpg')">
										<img>
											<xsl:attribute name="src"><xsl:value-of select="$media_path"/><xsl:value-of select="image"/></xsl:attribute>
											<xsl:attribute name="align"><xsl:value-of select="image/@align"/></xsl:attribute>
											<xsl:attribute name="alt"><xsl:value-of select="image/@alt"/></xsl:attribute>
											<xsl:attribute name="hspace">10</xsl:attribute>
										</img>
									</xsl:if>
									<xsl:value-of select="info" disable-output-escaping="yes"/>
								</td>
							</tr>
						</xsl:otherwise>
					</xsl:choose>
				</table>
			</td>
		</tr>
		<tr><td align="center"><xsl:call-template name="featured_vessels_vert"/></td></tr>
		<tr><td align="center"><xsl:call-template name="compan_info_vert"/></td></tr>
	</table>
</xsl:template>

<xsl:template name="page_horiz">
	<br/>
	<table cellpadding="0" cellspacing="0" width="760" align="center">
		<xsl:choose>
			<xsl:when test="//page/image/@align='center'">
				<xsl:if test="//page/image and contains(//page/image, 'jpg')">
					<tr>
						<td align="center">
							<img>
								<xsl:attribute name="src"><xsl:value-of select="$media_path"/><xsl:value-of select="image"/></xsl:attribute>
								<xsl:attribute name="align"><xsl:value-of select="image/@align"/></xsl:attribute>
								<xsl:attribute name="alt"><xsl:value-of select="image/@alt"/></xsl:attribute>
								<xsl:attribute name="vspace">10</xsl:attribute>
								<xsl:attribute name="hspace">10</xsl:attribute>
							</img>
						</td>
					</tr>
				</xsl:if>
				<tr><td><xsl:value-of select="info" disable-output-escaping="yes"/></td></tr>
			</xsl:when>
			<xsl:otherwise>
				<tr>
					<td>
						<xsl:if test="//page/image and contains(//page/image, 'jpg')">
							<img>
								<xsl:attribute name="src"><xsl:value-of select="$media_path"/><xsl:value-of select="image"/></xsl:attribute>
								<xsl:attribute name="align"><xsl:value-of select="image/@align"/></xsl:attribute>
								<xsl:attribute name="alt"><xsl:value-of select="image/@alt"/></xsl:attribute>
								<xsl:attribute name="hspace">10</xsl:attribute>
							</img>
						</xsl:if>
						<xsl:value-of select="info" disable-output-escaping="yes"/>
					</td>
				</tr>
			</xsl:otherwise>
		</xsl:choose>
		<tr><td align="center"><xsl:call-template name="featured_vessels"/></td></tr>
		<tr><td align="center"><xsl:apply-templates select="rowset[@id='company_info']"/></td></tr>
	</table>
</xsl:template>

<xsl:template name="featured_vessels">
	<xsl:variable name="currencies_id" select="7"/>
	<br/>
	<h3 style="margin: 0;" align="left"><xsl:value-of select="//page/featured_vessels_title"/></h3>
	<hr width="100%" size="1" color="{$header_bg_color}"/>
	<table border="0">
		<tr><td colspan="4"/></tr>
		<xsl:for-each select="//page/featured_vessels/vessel">
			<xsl:variable name="next_position" select="position() + 1"/>
			<xsl:variable name="post_next_position" select="position() + 2"/>
			<xsl:variable name="post_post_next_position" select="position() + 3"/>

			<xsl:variable name="next_image_path" select="../vessel[$next_position]/image_file"/>
			<xsl:variable name="post_image_path" select="../vessel[$post_next_position]/image_file"/>
			<xsl:variable name="post_post_image_path" select="../vessel[$post_post_next_position]/image_file"/>

			<xsl:variable name="next_ask_price" select="../vessel[$next_position]/ask_price"/>
			<xsl:variable name="post_ask_price" select="../vessel[$post_next_position]/ask_price"/>
			<xsl:variable name="post_post_ask_price" select="../vessel[$post_post_next_position]/ask_price"/>

			<xsl:variable name="next_original_price" select="../vessel[$next_position]/original_price"/>
			<xsl:variable name="post_original_price" select="../vessel[$post_next_position]/original_price"/>
			<xsl:variable name="post_post_original_price" select="../vessel[$post_post_next_position]/original_price"/>

			<xsl:variable name="next_original_currency_symbol" select="../vessel[$next_position]/original_currency_symbol"/>
			<xsl:variable name="post_original_currency_symbol" select="../vessel[$post_next_position]/original_currency_symbol"/>
			<xsl:variable name="post_post_original_currency_symbol" select="../vessel[$post_post_next_position]/original_currency_symbol"/>

			<xsl:variable name="next_curr_symbol" select="../vessel[$next_position]/curr_symbol"/>
			<xsl:variable name="post_curr_symbol" select="../vessel[$post_next_position]/curr_symbol"/>
			<xsl:variable name="post_post_curr_symbol" select="../vessel[$post_post_next_position]/curr_symbol"/>

			<xsl:variable name="next_poa_price" select="../vessel[$next_position]/poa_price"/>
			<xsl:variable name="post_poa_price" select="../vessel[$post_next_position]/poa_price"/>
			<xsl:variable name="post_post_poa_price" select="../vessel[$post_post_next_position]/poa_price"/>

			<xsl:variable name="next_vessels_id" select="../vessel[$next_position]/vessels_id"/>
			<xsl:variable name="post_vessels_id" select="../vessel[$post_next_position]/vessels_id"/>
			<xsl:variable name="post_post_vessels_id" select="../vessel[$post_post_next_position]/vessels_id"/>

			<xsl:variable name="next_year" select="../vessel[$next_position]/year"/>
			<xsl:variable name="post_year" select="../vessel[$post_next_position]/year"/>
			<xsl:variable name="post_post_year" select="../vessel[$post_post_next_position]/year"/>

			<xsl:variable name="next_category_type" select="../vessel[$next_position]/category_type"/>
			<xsl:variable name="post_category_type" select="../vessel[$post_next_position]/category_type"/>
			<xsl:variable name="post_post_category_type" select="../vessel[$post_post_next_position]/category_type"/>

			<xsl:variable name="next_length" select="../vessel[$next_position]/length"/>
			<xsl:variable name="post_length" select="../vessel[$post_next_position]/length"/>
			<xsl:variable name="post_post_length" select="../vessel[$post_post_next_position]/length"/>

			<xsl:variable name="next_vessel_manufacturer" select="../vessel[$next_position]/vessel_manufacturer"/>
			<xsl:variable name="post_vessel_manufacturer" select="../vessel[$post_next_position]/vessel_manufacturer"/>
			<xsl:variable name="post_post_vessel_manufacturer" select="../vessel[$post_post_next_position]/vessel_manufacturer"/>

			<xsl:if test="position() mod 4 = 1">
				<tr>
					<td valign="top">
						<table cellspacing="2" cellpadding="0" border="0">
							<tr>
								<td align="left" valign="top" colspan="2">
									<!--&#160;<b><xsl:value-of select="category_type"/> for sale</b><br/>-->
									&#160;<b><xsl:value-of select="category_type"/></b><br/>
								</td>
								<!--<td rowspan="2" width="1" bgcolor="{$color_main_first1}">-->
								<td rowspan="2" width="1">
									<img src="{$media_path}/spacer.gif" border="0" width="1"/>
								</td>
								<td align="left" valign="top" colspan="2">
									<!--&#160;<b><xsl:value-of select="$next_category_type"/> for sale</b><br/>-->
									&#160;<b><xsl:value-of select="$next_category_type"/></b><br/>
								</td>
								<xsl:if test="string-length($post_vessels_id)>0">
									<!--<td rowspan="2" width="1" bgcolor="{$color_main_first1}">-->
									<td rowspan="2" width="1">
										<img src="{$media_path}/spacer.gif" border="0" width="1"/>
									</td>
									<td align="left" valign="top" colspan="2">
										<!--&#160;<b><xsl:value-of select="$post_category_type"/> for sale</b><br/>-->
										&#160;<b><xsl:value-of select="$post_category_type"/></b><br/>
									</td>
								</xsl:if>
								<xsl:if test="string-length($post_post_vessels_id)>0">
									<!--<td rowspan="2" width="1" bgcolor="{$color_main_first1}">-->
									<td rowspan="2" width="1">
										<img src="{$media_path}/spacer.gif" border="0" width="1"/>
									</td>
									<td align="left" valign="top" colspan="2">
										<!--&#160;<b><xsl:value-of select="$post_post_category_type"/> for sale</b><br/>-->
										&#160;<b><xsl:value-of select="$post_post_category_type"/></b><br/>
									</td>
								</xsl:if>
							</tr>
							<tr>
								<td align="left" valign="top">
									<xsl:choose>
										<xsl:when test="/page/theme = 1">
											<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={vessels_id}&amp;curr_id={/page/currencies_id}&amp;vd=1" class="linkbold" title="YACHT ID#{vessels_id}">
												<xsl:choose>
													<xsl:when test="contains(image_file, 'jpg') or contains(image_file, 'JPG')">
														<img src="{$media_path}/{image_file}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" alt="YACHT ID#{vessels_id}"/>
													</xsl:when>
													<xsl:otherwise>
														<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
													</xsl:otherwise>
												</xsl:choose>
											</a>
										</xsl:when>
										<xsl:otherwise>
											<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={vessels_id}&amp;curr_id={/page/currencies_id}" class="linkbold" title="YACHT ID#{vessels_id}">
												<xsl:choose>
													<xsl:when test="contains(image_file, 'jpg') or contains(image_file, 'JPG')">
														<img src="{$media_path}/{image_file}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" alt="YACHT ID#{vessels_id}"/>
													</xsl:when>
													<xsl:otherwise>
														<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
													</xsl:otherwise>
												</xsl:choose>
											</a>
										</xsl:otherwise>
									</xsl:choose>
									<br/>
									<xsl:choose>
										<xsl:when test="poa_price='1'"><b><nobr>POA</nobr></b></xsl:when>
										<xsl:otherwise>
											&#160;
											<xsl:choose>
												<xsl:when test="original_currency_symbol!=curr_symbol">
													<nobr>
														(
															<xsl:call-template name="price">
																<xsl:with-param name="value" select="ask_price"/>
																<xsl:with-param name="symb" select="curr_symbol"/>
															</xsl:call-template>
														&#160;app.)
														<br/>
														<xsl:call-template name="spacer">
															<xsl:with-param name="width">7</xsl:with-param>
															<xsl:with-param name="height">4</xsl:with-param>
														</xsl:call-template>
														<xsl:call-template name="price">
															<xsl:with-param name="value" select="original_price"/>
															<xsl:with-param name="symb" select="original_currency_symbol"/>
														</xsl:call-template>
													</nobr>
												</xsl:when>
												<xsl:otherwise>
													<xsl:call-template name="price">
														<xsl:with-param name="value" select="ask_price"/>
														<xsl:with-param name="symb" select="curr_symbol"/>
													</xsl:call-template>
												</xsl:otherwise>
											</xsl:choose>
										</xsl:otherwise>
									</xsl:choose>
								</td>
								<td align="left" valign="top">
									<nobr><li type="square"><xsl:value-of select="length"/></li></nobr>
									<br/>
									<nobr>
										<li type="square">
											<xsl:value-of select="substring(vessel_manufacturer,1,16)" disable-output-escaping="yes"/>
											<xsl:if test="string-length(vessel_manufacturer) > 16">. . .</xsl:if>
										</li>
									</nobr>
									<br/>
									<nobr><li type="square"><xsl:value-of select="year"/></li></nobr>
								</td>
								<xsl:if test="not($next_position > last())">
									<td align="left" valign="top">
										<xsl:choose>
											<xsl:when test="/page/theme = 1">
												<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$next_vessels_id}&amp;curr_id={/page/currencies_id}&amp;vd=1" class="linkbold" title="YACHT ID#{$next_vessels_id}">
													<xsl:choose>
														<xsl:when test="contains($next_image_path, 'jpg') or contains($next_image_path, 'JPG')">
															<img src="{$media_path}/{$next_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" alt="YACHT ID#{$next_vessels_id}"/>
														</xsl:when>
														<xsl:otherwise>
															<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
														</xsl:otherwise>
													</xsl:choose>
												</a>
											</xsl:when>
											<xsl:otherwise>
												<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$next_vessels_id}&amp;curr_id={/page/currencies_id}" class="linkbold" title="YACHT ID#{$next_vessels_id}">
													<xsl:choose>
														<xsl:when test="contains($next_image_path, 'jpg') or contains($next_image_path, 'JPG')">
															<img src="{$media_path}/{$next_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" alt="YACHT ID#{$next_vessels_id}"/>
														</xsl:when>
														<xsl:otherwise>
															<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
														</xsl:otherwise>
													</xsl:choose>
												</a>
											</xsl:otherwise>
										</xsl:choose>
										<br/>
										<xsl:choose>
											<xsl:when test="poa_price='1'"><b><nobr>POA</nobr></b></xsl:when>
											<xsl:otherwise>
												&#160;
												<xsl:choose>
													<xsl:when test="$next_original_currency_symbol!=$next_curr_symbol">
														<nobr>
															(
																<xsl:call-template name="price">
																	<xsl:with-param name="value" select="$next_ask_price"/>
																	<xsl:with-param name="symb" select="$next_curr_symbol"/>
																</xsl:call-template>
															&#160;app.)
															<br/>
															<xsl:call-template name="spacer">
																<xsl:with-param name="width">7</xsl:with-param>
																<xsl:with-param name="height">4</xsl:with-param>
															</xsl:call-template>
															<xsl:call-template name="price">
																<xsl:with-param name="value" select="$next_original_price"/>
																<xsl:with-param name="symb" select="$next_original_currency_symbol"/>
															</xsl:call-template>
														</nobr>
													</xsl:when>
													<xsl:otherwise>
														<xsl:call-template name="price">
															<xsl:with-param name="value" select="$next_ask_price"/>
															<xsl:with-param name="symb" select="$next_curr_symbol"/>
														</xsl:call-template>
													</xsl:otherwise>
												</xsl:choose>
											</xsl:otherwise>
										</xsl:choose>
									</td>
								</xsl:if>
								<xsl:if test="not($next_position > last())">
									<td align="left" valign="top">
										<nobr><li type="square"><xsl:value-of select="$next_length"/></li></nobr>
										<br/>
										<nobr>
											<li type="square">
												<xsl:value-of select="substring($next_vessel_manufacturer,1,16)" disable-output-escaping="yes"/>
												<xsl:if test="string-length($next_vessel_manufacturer) > 16">. . .</xsl:if>
											</li>
										</nobr>
										<br/>
										<nobr><li type="square"><xsl:value-of select="$next_year"/></li></nobr>
									</td>
								</xsl:if>
								<xsl:if test="not($post_next_position > last())">
									<td align="left" valign="top">
										<xsl:choose>
											<xsl:when test="/page/theme = 1">
												<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$post_vessels_id}&amp;curr_id={/page/currencies_id}&amp;vd=1" class="linkbold" title="YACHT ID#{$post_vessels_id}">
													<xsl:choose>
														<xsl:when test="contains($post_image_path, 'jpg') or contains($post_image_path, 'JPG')">
															<img src="{$media_path}/{$post_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" alt="YACHT ID#{$post_vessels_id}"/>
														</xsl:when>
														<xsl:otherwise>
															<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
														</xsl:otherwise>
													</xsl:choose>
												</a>
											</xsl:when>
											<xsl:otherwise>
												<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$post_vessels_id}&amp;curr_id={/page/currencies_id}" class="linkbold" title="YACHT ID#{$post_vessels_id}">
													<xsl:choose>
														<xsl:when test="contains($post_image_path, 'jpg') or contains($post_image_path, 'JPG')">
															<img src="{$media_path}/{$post_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" alt="YACHT ID#{$post_vessels_id}"/>
														</xsl:when>
														<xsl:otherwise>
															<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
														</xsl:otherwise>
													</xsl:choose>
												</a>
											</xsl:otherwise>
										</xsl:choose>
										<br/>
										<xsl:choose>
											<xsl:when test="poa_price='1'"><b><nobr>POA</nobr></b></xsl:when>
											<xsl:otherwise>
												&#160;
												<xsl:choose>
													<xsl:when test="$post_original_currency_symbol!=$post_curr_symbol">
														<nobr>
															(
																<xsl:call-template name="price">
																	<xsl:with-param name="value" select="$post_ask_price"/>
																	<xsl:with-param name="symb" select="$post_curr_symbol"/>
																</xsl:call-template>
															&#160;app.)
															<br/>
															<xsl:call-template name="spacer">
																<xsl:with-param name="width">7</xsl:with-param>
																<xsl:with-param name="height">4</xsl:with-param>
															</xsl:call-template>
															<xsl:call-template name="price">
																<xsl:with-param name="value" select="$post_original_price"/>
																<xsl:with-param name="symb" select="$post_original_currency_symbol"/>
															</xsl:call-template>
														</nobr>
													</xsl:when>
													<xsl:otherwise>
														<xsl:call-template name="price">
															<xsl:with-param name="value" select="$post_ask_price"/>
															<xsl:with-param name="symb" select="$post_curr_symbol"/>
														</xsl:call-template>
													</xsl:otherwise>
												</xsl:choose>
											</xsl:otherwise>
										</xsl:choose>
									</td>
								</xsl:if>
								<xsl:if test="not($post_next_position > last())">
									<td align="left" valign="top">
										<nobr><li type="square"><xsl:value-of select="$post_length"/></li></nobr>
										<br/>
										<nobr>
											<li type="square">
												<xsl:value-of select="substring($post_vessel_manufacturer,1,16)" disable-output-escaping="yes"/>
												<xsl:if test="string-length($post_vessel_manufacturer) > 16">. . .</xsl:if>
											</li>
										</nobr>
										<br/>
										<nobr><li type="square"><xsl:value-of select="$post_year"/></li></nobr>
									</td>
								</xsl:if>
								<xsl:if test="not($post_post_next_position > last())">
									<td align="left" valign="top">
										<xsl:choose>
											<xsl:when test="/page/theme = 1">
												<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$post_post_vessels_id}&amp;curr_id={/page/currencies_id}&amp;vd=1" class="linkbold" title="YACHT ID#{$post_post_vessels_id}">
													<xsl:choose>
														<xsl:when test="contains($post_post_image_path, 'jpg') or contains($post_post_image_path, 'JPG')">
															<img src="{$media_path}/{$post_post_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" title="YACHT ID#{$post_post_vessels_id}"/>
														</xsl:when>
														<xsl:otherwise>
															<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
														</xsl:otherwise>
													</xsl:choose>
												</a>
											</xsl:when>
											<xsl:otherwise>
												<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$post_post_vessels_id}&amp;curr_id={/page/currencies_id}" class="linkbold" title="YACHT ID#{$post_post_vessels_id}">
													<xsl:choose>
														<xsl:when test="contains($post_post_image_path, 'jpg') or contains($post_post_image_path, 'JPG')">
															<img src="{$media_path}/{$post_post_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" title="YACHT ID#{$post_post_vessels_id}"/>
														</xsl:when>
														<xsl:otherwise>
															<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
														</xsl:otherwise>
													</xsl:choose>
												</a>
											</xsl:otherwise>
										</xsl:choose>
										<br/>
										<xsl:choose>
											<xsl:when test="poa_price='1'"><b><nobr>POA</nobr></b></xsl:when>
											<xsl:otherwise>
												&#160;
												<xsl:choose>
													<xsl:when test="$post_post_original_currency_symbol!=$post_post_curr_symbol">
														<nobr>
															(
																<xsl:call-template name="price">
																	<xsl:with-param name="value" select="$post_post_ask_price"/>
																	<xsl:with-param name="symb" select="$post_post_curr_symbol"/>
																</xsl:call-template>
															&#160;app.)
															<br/>
															<xsl:call-template name="spacer">
																<xsl:with-param name="width">7</xsl:with-param>
																<xsl:with-param name="height">4</xsl:with-param>
															</xsl:call-template>
															<xsl:call-template name="price">
																<xsl:with-param name="value" select="$post_post_original_price"/>
																<xsl:with-param name="symb" select="$post_post_original_currency_symbol"/>
															</xsl:call-template>
														</nobr>
													</xsl:when>
													<xsl:otherwise>
														<xsl:call-template name="price">
															<xsl:with-param name="value" select="$post_post_ask_price"/>
															<xsl:with-param name="symb" select="$post_post_curr_symbol"/>
														</xsl:call-template>
													</xsl:otherwise>
												</xsl:choose>
											</xsl:otherwise>
										</xsl:choose>
									</td>
								</xsl:if>
								<xsl:if test="not($post_post_next_position > last())">
									<td align="left" valign="top">
										<nobr><li type="square"><xsl:value-of select="$post_post_length"/></li></nobr>
										<br/>
										<nobr>
											<li type="square">
												<xsl:value-of select="substring($post_post_vessel_manufacturer,1,16)" disable-output-escaping="yes"/>
												<xsl:if test="string-length($post_post_vessel_manufacturer) > 16">. . .</xsl:if>
											</li>
										</nobr>
										<br/>
										<nobr><li type="square"><xsl:value-of select="$post_post_year"/></li></nobr>
									</td>
								</xsl:if>
							</tr>
						</table>
					</td>
				</tr>
			</xsl:if>
		</xsl:for-each>
	</table>
</xsl:template>

<xsl:template name="featured_vessels_vert">
	<xsl:variable name="currencies_id" select="7"/>
	<br/>
	<h3 style="margin: 0;" align="left"><xsl:value-of select="//page/featured_vessels_title"/></h3>
	<hr width="100%" size="1" color="{$header_bg_color}"/>
	<table border="0" cellpadding="0" cellspacing="0">
		<tr><td colspan="4"/></tr>
		<xsl:for-each select="//page/featured_vessels/vessel">
			<xsl:variable name="next_position" select="position() + 1"/>
			<xsl:variable name="post_next_position" select="position() + 2"/>
			<xsl:variable name="post_post_next_position" select="position() + 3"/>

			<xsl:variable name="next_image_path" select="../vessel[$next_position]/image_file"/>
			<xsl:variable name="post_image_path" select="../vessel[$post_next_position]/image_file"/>
			<xsl:variable name="post_post_image_path" select="../vessel[$post_post_next_position]/image_file"/>

			<xsl:variable name="next_ask_price" select="../vessel[$next_position]/ask_price"/>
			<xsl:variable name="post_ask_price" select="../vessel[$post_next_position]/ask_price"/>
			<xsl:variable name="post_post_ask_price" select="../vessel[$post_post_next_position]/ask_price"/>

			<xsl:variable name="next_original_price" select="../vessel[$next_position]/original_price"/>
			<xsl:variable name="post_original_price" select="../vessel[$post_next_position]/original_price"/>
			<xsl:variable name="post_post_original_price" select="../vessel[$post_post_next_position]/original_price"/>

			<xsl:variable name="next_original_currency_symbol" select="../vessel[$next_position]/original_currency_symbol"/>
			<xsl:variable name="post_original_currency_symbol" select="../vessel[$post_next_position]/original_currency_symbol"/>
			<xsl:variable name="post_post_original_currency_symbol" select="../vessel[$post_post_next_position]/original_currency_symbol"/>

			<xsl:variable name="next_curr_symbol" select="../vessel[$next_position]/curr_symbol"/>
			<xsl:variable name="post_curr_symbol" select="../vessel[$post_next_position]/curr_symbol"/>
			<xsl:variable name="post_post_curr_symbol" select="../vessel[$post_post_next_position]/curr_symbol"/>

			<xsl:variable name="next_poa_price" select="../vessel[$next_position]/poa_price"/>
			<xsl:variable name="post_poa_price" select="../vessel[$post_next_position]/poa_price"/>
			<xsl:variable name="post_post_poa_price" select="../vessel[$post_post_next_position]/poa_price"/>

			<xsl:variable name="next_vessels_id" select="../vessel[$next_position]/vessels_id"/>
			<xsl:variable name="post_vessels_id" select="../vessel[$post_next_position]/vessels_id"/>
			<xsl:variable name="post_post_vessels_id" select="../vessel[$post_post_next_position]/vessels_id"/>

			<xsl:variable name="next_year" select="../vessel[$next_position]/year"/>
			<xsl:variable name="post_year" select="../vessel[$post_next_position]/year"/>
			<xsl:variable name="post_post_year" select="../vessel[$post_post_next_position]/year"/>

			<xsl:variable name="next_category_type" select="../vessel[$next_position]/category_type"/>
			<xsl:variable name="post_category_type" select="../vessel[$post_next_position]/category_type"/>
			<xsl:variable name="post_post_category_type" select="../vessel[$post_post_next_position]/category_type"/>

			<xsl:variable name="next_length" select="../vessel[$next_position]/length"/>
			<xsl:variable name="post_length" select="../vessel[$post_next_position]/length"/>
			<xsl:variable name="post_post_length" select="../vessel[$post_post_next_position]/length"/>

			<xsl:variable name="next_vessel_manufacturer" select="../vessel[$next_position]/vessel_manufacturer"/>
			<xsl:variable name="post_vessel_manufacturer" select="../vessel[$post_next_position]/vessel_manufacturer"/>
			<xsl:variable name="post_post_vessel_manufacturer" select="../vessel[$post_post_next_position]/vessel_manufacturer"/>

			<xsl:if test="position() mod 4 = 1">
				<tr>
					<td valign="top">
						<table cellspacing="10" cellpadding="0" border="0">
							<tr>
								<td align="left" valign="top" colspan="2">
									<!--<b><xsl:value-of select="category_type"/> for sale</b><br/>-->
									<b><xsl:value-of select="category_type"/></b><br/>
								</td>
								<td rowspan="2">&#160;</td>
								<!--<td rowspan="2" width="1" bgcolor="{$color_main_first1}">-->
								<td rowspan="2" width="1">
									<img src="{$media_path}/spacer.gif" border="0" width="1"/>
								</td>
								<td rowspan="2">&#160;</td>
								<td align="left" valign="top" colspan="2">
									<!--<b><xsl:value-of select="$next_category_type"/> for sale</b><br/>-->
									<b><xsl:value-of select="$next_category_type"/></b><br/>
								</td>
							</tr>
							<tr>
								<td align="left" valign="top">
									<xsl:choose>
										<xsl:when test="//page/theme = 1">
											<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={vessels_id}&amp;curr_id={/page/currencies_id}&amp;vd=1" class="linkbold" title="YACHT ID#{vessels_id}">
												<xsl:choose>
													<xsl:when test="contains(image_file, 'jpg') or contains(image_file, 'JPG')">
														<img src="{$media_path}/{image_file}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" alt="YACHT ID#{vessels_id}"/>
													</xsl:when>
													<xsl:otherwise>
														<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
													</xsl:otherwise>
												</xsl:choose>
											</a>
										</xsl:when>
										<xsl:otherwise>
											<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={vessels_id}&amp;curr_id={/page/currencies_id}" class="linkbold" title="YACHT ID#{vessels_id}">
												<xsl:choose>
													<xsl:when test="contains(image_file, 'jpg') or contains(image_file, 'JPG')">
														<img src="{$media_path}/{image_file}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" alt="YACHT ID#{vessels_id}"/>
													</xsl:when>
													<xsl:otherwise>
														<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
													</xsl:otherwise>
												</xsl:choose>
											</a>
										</xsl:otherwise>
									</xsl:choose>
									<br/>
									<xsl:choose>
										<xsl:when test="poa_price='1'"><b><nobr>Price On Application</nobr></b></xsl:when>
										<xsl:otherwise>
											&#160;
											<xsl:choose>
												<xsl:when test="original_currency_symbol!=curr_symbol">
													<nobr>
														(
															<xsl:call-template name="price">
																<xsl:with-param name="value" select="ask_price"/>
																<xsl:with-param name="symb" select="curr_symbol"/>
															</xsl:call-template>
														&#160;app.)
														<br/>
														<xsl:call-template name="spacer">
															<xsl:with-param name="width">7</xsl:with-param>
															<xsl:with-param name="height">4</xsl:with-param>
														</xsl:call-template>
														<xsl:call-template name="price">
															<xsl:with-param name="value" select="original_price"/>
															<xsl:with-param name="symb" select="original_currency_symbol"/>
														</xsl:call-template>
													</nobr>
												</xsl:when>
												<xsl:otherwise>
													<xsl:call-template name="price">
														<xsl:with-param name="value" select="ask_price"/>
														<xsl:with-param name="symb" select="curr_symbol"/>
													</xsl:call-template>
												</xsl:otherwise>
											</xsl:choose>
										</xsl:otherwise>
									</xsl:choose>
								</td>
								<td align="left" valign="top">
									<nobr><li type="square"><xsl:value-of select="length"/></li></nobr>
									<br/>
									<nobr><li type="square"><xsl:value-of select="vessel_manufacturer"/></li></nobr>
									<br/>
									<nobr><li type="square"><xsl:value-of select="year"/></li></nobr>
								</td>
								<xsl:if test="not($next_position > last())">
									<td align="left" valign="top">
										<xsl:choose>
											<xsl:when test="/page/theme = 1">
												<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$next_vessels_id}&amp;curr_id={/page/currencies_id}&amp;vd=1" class="linkbold" title="YACHT ID#{$next_vessels_id}">
													<xsl:choose>
														<xsl:when test="contains($next_image_path, 'jpg') or contains($next_image_path, 'JPG')">
															<img src="{$media_path}/{$next_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" alt="YACHT ID#{$next_vessels_id}"/>
														</xsl:when>
														<xsl:otherwise>
															<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
														</xsl:otherwise>
													</xsl:choose>
												</a>
											</xsl:when>
											<xsl:otherwise>
												<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$next_vessels_id}&amp;curr_id={/page/currencies_id}" class="linkbold" title="YACHT ID#{$next_vessels_id}">
													<xsl:choose>
														<xsl:when test="contains($next_image_path, 'jpg') or contains($next_image_path, 'JPG')">
															<img src="{$media_path}/{$next_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" alt="YACHT ID#{$next_vessels_id}"/>
														</xsl:when>
														<xsl:otherwise>
															<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
														</xsl:otherwise>
													</xsl:choose>
												</a>
											</xsl:otherwise>
										</xsl:choose>
										<br/>
										<xsl:choose>
											<xsl:when test="poa_price='1'"><b><nobr>Price On Application</nobr></b></xsl:when>
											<xsl:otherwise>
												&#160;
												<xsl:choose>
													<xsl:when test="$next_original_currency_symbol!=$next_curr_symbol">
														<nobr>
															(
																<xsl:call-template name="price">
																	<xsl:with-param name="value" select="$next_ask_price"/>
																	<xsl:with-param name="symb" select="$next_curr_symbol"/>
																</xsl:call-template>
															&#160;app.)
															<br/>
															<xsl:call-template name="spacer">
																<xsl:with-param name="width">7</xsl:with-param>
																<xsl:with-param name="height">4</xsl:with-param>
															</xsl:call-template>
															<xsl:call-template name="price">
																<xsl:with-param name="value" select="$next_original_price"/>
																<xsl:with-param name="symb" select="$next_original_currency_symbol"/>
															</xsl:call-template>
														</nobr>
													</xsl:when>
													<xsl:otherwise>
														<xsl:call-template name="price">
															<xsl:with-param name="value" select="$next_ask_price"/>
															<xsl:with-param name="symb" select="$next_curr_symbol"/>
														</xsl:call-template>
													</xsl:otherwise>
												</xsl:choose>
											</xsl:otherwise>
										</xsl:choose>
									</td>
								</xsl:if>
								<xsl:if test="not($next_position > last())">
									<td align="left" valign="top">
										<nobr><li type="square"><xsl:value-of select="$next_length"/></li></nobr>
										<br/>
										<nobr><li type="square"><xsl:value-of select="$next_vessel_manufacturer"/></li></nobr>
										<br/><nobr><li type="square"><xsl:value-of select="$next_year"/></li></nobr>
									</td>
								</xsl:if>
							</tr>
							<xsl:choose>
								<xsl:when test="string-length($post_vessels_id)>0">
									<!--<td colspan="7" bgcolor="{$color_main_first1}">-->
									<td colspan="7">
										<img src="{$media_path}/spacer.gif" border="0" width="1"/>
									</td>
								</xsl:when>
								<xsl:otherwise>
									<td colspan="7">
										<img src="{$media_path}/spacer.gif" border="0" width="1"/>
									</td>
								</xsl:otherwise>
							</xsl:choose>
							<tr>
								<td align="left" valign="top" colspan="2">
									<xsl:choose>
										<xsl:when test="string-length($post_vessels_id)>0">
											<!--<b><xsl:value-of select="$post_category_type"/> for sale</b><br/>-->
											<b><xsl:value-of select="$post_category_type"/></b><br/>
										</xsl:when>
										<xsl:otherwise> </xsl:otherwise>
									</xsl:choose>
								</td>
								<td rowspan="2">&#160;</td>
								<xsl:choose>
									<xsl:when test="string-length($post_post_vessels_id)>0">
										<!--<td rowspan="2" width="1" bgcolor="{$color_main_first1}">-->
										<td rowspan="2" width="1">
											<img src="{$media_path}/spacer.gif" border="0" width="1"/>
										</td>
									</xsl:when>
									<xsl:otherwise>
										<td colspan="7">
											<img src="{$media_path}/spacer.gif" border="0" width="1"/>
										</td>
									</xsl:otherwise>
								</xsl:choose>
								<td rowspan="2">&#160;</td>
								<td align="left" valign="top" colspan="2">
									<xsl:choose>
										<xsl:when test="string-length($post_post_vessels_id)>0">
											<!--<b><xsl:value-of select="$post_post_category_type"/> for sale</b><br/>-->
											<b><xsl:value-of select="$post_post_category_type"/></b><br/>
										</xsl:when>
										<xsl:otherwise> </xsl:otherwise>
									</xsl:choose>
								</td>
							</tr>
							<tr>
								<xsl:if test="not($post_next_position > last())">
									<td align="left" valign="top">
										<xsl:choose>
											<xsl:when test="/page/theme = 1">
												<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$post_vessels_id}&amp;curr_id={/page/currencies_id}&amp;vd=1" class="linkbold" title="YACHT ID#{$post_vessels_id}">
													<xsl:choose>
														<xsl:when test="contains($post_image_path, 'jpg') or contains($post_image_path, 'JPG')">
															<img src="{$media_path}/{$post_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" alt="YACHT ID#{$post_vessels_id}"/>
														</xsl:when>
														<xsl:otherwise>
															<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
														</xsl:otherwise>
													</xsl:choose>
												</a>
											</xsl:when>
											<xsl:otherwise>
												<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$post_vessels_id}&amp;curr_id={/page/currencies_id}" class="linkbold" title="YACHT ID#{$post_vessels_id}">
													<xsl:choose>
														<xsl:when test="contains($post_image_path, 'jpg') or contains($post_image_path, 'JPG')">
															<img src="{$media_path}/{$post_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" alt="YACHT ID#{$post_vessels_id}"/>
														</xsl:when>
														<xsl:otherwise>
															<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
														</xsl:otherwise>
													</xsl:choose>
												</a>
											</xsl:otherwise>
										</xsl:choose>
										<br/>
										<xsl:choose>
											<xsl:when test="poa_price='1'"><b><nobr>Price On Application</nobr></b></xsl:when>
											<xsl:otherwise>
												&#160;
												<xsl:choose>
													<xsl:when test="$post_original_currency_symbol!=$post_curr_symbol">
														<nobr>
															(
																<xsl:call-template name="price">
																	<xsl:with-param name="value" select="$post_ask_price"/>
																	<xsl:with-param name="symb" select="$post_curr_symbol"/>
																</xsl:call-template>
															&#160;app.)
															<br/>
															<xsl:call-template name="spacer">
																<xsl:with-param name="width">7</xsl:with-param>
																<xsl:with-param name="height">4</xsl:with-param>
															</xsl:call-template>
															<xsl:call-template name="price">
																<xsl:with-param name="value" select="$post_original_price"/>
																<xsl:with-param name="symb" select="$post_original_currency_symbol"/>
															</xsl:call-template>
														</nobr>
													</xsl:when>
													<xsl:otherwise>
														<xsl:call-template name="price">
															<xsl:with-param name="value" select="$post_ask_price"/>
															<xsl:with-param name="symb" select="$post_curr_symbol"/>
														</xsl:call-template>
													</xsl:otherwise>
												</xsl:choose>
											</xsl:otherwise>
										</xsl:choose>
									</td>
								</xsl:if>
								<xsl:if test="not($post_next_position > last())">
									<td align="left" valign="top">
										<nobr><li type="square"><xsl:value-of select="$post_length"/></li></nobr>
										<br/>
										<nobr><li type="square"><xsl:value-of select="$post_vessel_manufacturer"/></li></nobr>
										<br/>
										<nobr><li type="square"><xsl:value-of select="$post_year"/></li></nobr>
									</td>
								</xsl:if>
								<xsl:if test="not($post_post_next_position > last())">
									<td align="left" valign="top">
										<xsl:choose>
											<xsl:when test="/page/theme = 1">
												<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$post_post_vessels_id}&amp;curr_id={/page/currencies_id}&amp;vd=1" class="linkbold" title="YACHT ID#{$post_post_vessels_id}">
													<xsl:choose>
														<xsl:when test="contains($post_post_image_path, 'jpg') or contains($post_post_image_path, 'JPG')">
															<img src="{$media_path}/{$post_post_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" title="YACHT ID#{$post_post_vessels_id}"/>
														</xsl:when>
														<xsl:otherwise>
															<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
														</xsl:otherwise>
													</xsl:choose>
												</a>
											</xsl:when>
											<xsl:otherwise>
												<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$post_post_vessels_id}&amp;curr_id={/page/currencies_id}" class="linkbold" title="YACHT ID#{$post_post_vessels_id}">
													<xsl:choose>
														<xsl:when test="contains($post_post_image_path, 'jpg') or contains($post_post_image_path, 'JPG')">
															<img src="{$media_path}/{$post_post_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2" title="YACHT ID#{$post_post_vessels_id}"/>
														</xsl:when>
														<xsl:otherwise>
															<div align="center"><nobr><font color="#666666">no image<br/>available</font></nobr></div>
														</xsl:otherwise>
													</xsl:choose>
												</a>
											</xsl:otherwise>
										</xsl:choose>
										<br/>
										<xsl:choose>
											<xsl:when test="poa_price='1'"><b><nobr>Price On Application</nobr></b></xsl:when>
											<xsl:otherwise>
												&#160;
												<xsl:choose>
													<xsl:when test="$post_post_original_currency_symbol!=$post_post_curr_symbol">
														<nobr>
															(
																<xsl:call-template name="price">
																	<xsl:with-param name="value" select="$post_post_ask_price"/>
																	<xsl:with-param name="symb" select="$post_post_curr_symbol"/>
																</xsl:call-template>
															&#160;app.)
															<br/>
															<xsl:call-template name="spacer">
																<xsl:with-param name="width">7</xsl:with-param>
																<xsl:with-param name="height">4</xsl:with-param>
															</xsl:call-template>
															<xsl:call-template name="price">
																<xsl:with-param name="value" select="$post_post_original_price"/>
																<xsl:with-param name="symb" select="$post_post_original_currency_symbol"/>
															</xsl:call-template>
														</nobr>
													</xsl:when>
													<xsl:otherwise>
														<xsl:call-template name="price">
															<xsl:with-param name="value" select="$post_post_ask_price"/>
															<xsl:with-param name="symb" select="$post_post_curr_symbol"/>
														</xsl:call-template>
													</xsl:otherwise>
												</xsl:choose>
											</xsl:otherwise>
										</xsl:choose>
									</td>
								</xsl:if>
								<xsl:if test="not($post_post_next_position > last())">
									<td align="left" valign="top">
										<nobr><li type="square"><xsl:value-of select="$post_post_length"/></li></nobr>
										<br/>
										<nobr><li type="square"><xsl:value-of select="$post_post_vessel_manufacturer"/></li></nobr>
										<br/>
										<nobr><li type="square"><xsl:value-of select="$post_post_year"/></li></nobr>
									</td>
								</xsl:if>
							</tr>
						</table>
					</td>
				</tr>
			</xsl:if>
		</xsl:for-each>
	</table>
</xsl:template>

<!--<xsl:template name="featured_vessels_vert_old">
	<xsl:variable name="currencies_id" select="7"/>
	
	<table cellpadding="2" cellspacing="1">
		<tr>
			<td colspan="4">
			<nobr>
	<h3 style="margin: 0;" align="left">
		<xsl:value-of select="//page/featured_vessels_title"/>
	</h3></nobr>
	<hr width="100%" size="1" color="{$header_bg_color}"/>
			</td>
		</tr>
			<xsl:for-each select="//page/featured_vessels/vessel">
				<xsl:variable name="next_position" select="position() + 1"/>
<xsl:variable name="post_next_position" select="position() + 2"/>
<xsl:variable name="post_post_next_position" select="position() + 3"/>
<xsl:variable name="next_image_path" select="../vessel[$next_position]/image_file"/>
<xsl:variable name="post_image_path" select="../vessel[$post_next_position]/image_file"/>
<xsl:variable name="post_post_image_path" select="../vessel[$post_post_next_position]/image_file"/>
<xsl:variable name="next_vessels_id" select="../vessel[$next_position]/vessels_id"/>
<xsl:variable name="post_vessels_id" select="../vessel[$post_next_position]/vessels_id"/>
<xsl:variable name="post_post_vessels_id" select="../vessel[$post_post_next_position]/vessels_id"/>

<xsl:variable name="next_year" select="../vessel[$next_position]/year"/>
<xsl:variable name="post_year" select="../vessel[$post_next_position]/year"/>
<xsl:variable name="post_post_year" select="../vessel[$post_post_next_position]/year"/>

<xsl:variable name="next_category_type" select="../vessel[$next_position]/category_type"/>
<xsl:variable name="post_category_type" select="../vessel[$post_next_position]/category_type"/>
<xsl:variable name="post_post_category_type" select="../vessel[$post_post_next_position]/category_type"/>

<xsl:variable name="next_length" select="../vessel[$next_position]/length"/>
<xsl:variable name="post_length" select="../vessel[$post_next_position]/length"/>
<xsl:variable name="post_post_length" select="../vessel[$post_post_next_position]/length"/>

<xsl:variable name="next_vessel_manufacturer" select="../vessel[$next_position]/vessel_manufacturer"/>
<xsl:variable name="post_vessel_manufacturer" select="../vessel[$post_next_position]/vessel_manufacturer"/>
<xsl:variable name="post_post_vessel_manufacturer" select="../vessel[$post_post_next_position]/vessel_manufacturer"/>
				<xsl:if test="position() mod 4 = 1">
					<tr><td colspan="2"><xsl:value-of select="category_type"/> for sale</td></tr>
					<tr><td valign="top" align="left">
					<xsl:choose>
					<xsl:when test="/page/theme = 1">
						<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={vessels_id}&amp;curr_id={/page/currencies_id}&amp;vd=1" class="linkbold"><img src="{$media_path}/{image_file}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2"/></a>
</xsl:when>
<xsl:otherwise>
<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={vessels_id}&amp;curr_id={/page/currencies_id}" class="linkbold"><img src="{$media_path}/{image_file}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2"/></a>
</xsl:otherwise>
</xsl:choose>
<br/></td><td>
<nobr>

<li/><xsl:value-of select="length"/><br/><li/><xsl:value-of select="vessel_manufacturer"/><br/><li/><xsl:value-of select="year"/></nobr>
						
					</td></tr>
					<xsl:if test="not($next_position > last())">
						<tr><td colspan="2"><hr width="100%" size="1" color="{$header_bg_color}"/></td></tr>
						<tr><td colspan="2"><xsl:value-of select="$next_category_type"/> for sale</td></tr>
						<tr><td valign="top" align="center">
						<xsl:choose>
						<xsl:when test="/page/theme = 1">
							<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$next_vessels_id}&amp;curr_id={/page/currencies_id}&amp;" class="linkbold"><img src="{$media_path}/{$next_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2"/>
							</a>
							</xsl:when>
							<xsl:otherwise>
							<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$next_vessels_id}&amp;curr_id={/page/currencies_id}" class="linkbold"><img src="{$media_path}/{$next_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2"/>
							</a>							
							</xsl:otherwise>
							</xsl:choose>
							</td><td><nobr><li/><xsl:value-of select="$next_length"/><br/><li/><xsl:value-of select="$next_vessel_manufacturer"/><br/><li/><xsl:value-of select="$next_year"/></nobr>
						</td></tr>
					</xsl:if>
					<xsl:if test="not($post_next_position > last())">
						<tr><td colspan="2"><hr width="100%" size="1" color="{$header_bg_color}"/></td></tr>		
						<tr><td colspan="2"><xsl:value-of select="$post_category_type"/> for sale</td></tr>
						<tr><td valign="top" align="center">
						<xsl:choose>
						<xsl:when test="/page/theme = 1">
							<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$post_vessels_id}&amp;curr_id={/page/currencies_id}&amp;vd=1" class="linkbold"><img src="{$media_path}/{$post_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2"/>
							</a>
							</xsl:when>
							<xsl:otherwise>
<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$post_vessels_id}&amp;curr_id={/page/currencies_id}" class="linkbold"><img src="{$media_path}/{$post_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2"/>
							</a>							
							</xsl:otherwise>
							</xsl:choose>
							</td><td><nobr><li/><xsl:value-of select="$post_length"/><br/><li/><xsl:value-of select="$post_vessel_manufacturer"/><br/><li/><xsl:value-of select="$post_year"/></nobr>
						</td></tr>
					</xsl:if>
					<xsl:if test="not($post_post_next_position > last())">
						<tr><td colspan="2"><hr width="100%" size="1" color="{$header_bg_color}"/></td></tr>	
						<tr><td colspan="2"><xsl:value-of select="$post_post_category_type"/> for sale</td></tr>	
						<tr><td valign="top" align="center">
						<xsl:choose>
						<xsl:when test="/page/theme = 1">
							<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$post_post_vessels_id}&amp;curr_id={/page/currencies_id}&amp;vd=1" class="linkbold"><img src="{$media_path}/{$post_post_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2"/>
							</a>
						</xsl:when>
						<xsl:otherwise>
							<a href="main.asp?-vessel_basic_info.asp-&amp;vessels_id={$post_post_vessels_id}&amp;curr_id={/page/currencies_id}" class="linkbold"><img src="{$media_path}/{$post_post_image_path}" border="1" style="border-color:#{$header_bg_color};" hspace="2" vspace="2"/>
							</a>						
						</xsl:otherwise>
						</xsl:choose>
						</td><td><nobr><li/><xsl:value-of select="$post_post_length"/><br/><li/><xsl:value-of select="$post_post_vessel_manufacturer"/><br/><li/><xsl:value-of select="$post_post_year"/></nobr>
						</td></tr>
					</xsl:if>
				</xsl:if>
			</xsl:for-each>
	</table>
</xsl:template>-->

<xsl:template match="rowset[@id='company_info']">
	<xsl:variable name="col_count" select="metadata/column-count"/>
	<!--<h3 style="margin: 0;" align="left"><xsl:value-of select="//page/rowset/data/row/col[@name='name']"/></h3>-->
	<hr width="100%" size="1" noshade="true" color="{$header_bg_color}"/>
	<table align="center" width="100%" cellspacing="2" cellpadding="2">
		<tr>
			<td>
				<table class="company_detail" cellspacing="6" width="100%" cellpadding="2" border="0" align="center">
					<tr>
						<xsl:for-each select="data/row">
							<xsl:variable name="rowId" select="col[1]"/>
							<xsl:if test="position() mod 3 = 1">
								<xsl:text disable-output-escaping="yes"><![CDATA[</tr><tr>]]></xsl:text>
							</xsl:if> 
							<td valign="top">
								<xsl:if test="position() >= 2">
									<table cellspacing="0" cellpadding="0" width="100%">
										<tr>
											<td>
												<nobr>
													<font class="flocation" color="{$color_main_first1}">
														<b>
															<xsl:if test="normalize-space(col[@name='city'])"><xsl:value-of select="col[@name='city']" disable-output-escaping="no"/>&#160;</xsl:if>Location
														</b>
													</font>
												</nobr>
											</td>
										</tr>
										<!--<tr>
											<td bgcolor="{$header_bg_color}" height="1">
												<img src="{$img_path_templates}/spacer.gif" width="1" height="1"/>
											</td>
										</tr>-->
									</table>
								</xsl:if>
								<xsl:if test="position() = 1">
									<table cellspacing="0" cellpadding="0" width="100%">
										<tr>
											<td>
												<nobr>
													<font class="flocation" color="{$color_main_first1}">
														<b>
															<xsl:if test="normalize-space(col[@name='city'])"><xsl:value-of select="col[@name='city']" disable-output-escaping="no"/>&#160;</xsl:if>Location
														</b>
													</font>
												</nobr>
											</td>
										</tr>
										<!--<tr>
											<td bgcolor="{$header_bg_color}" height="1">
												<img src="{$img_path_templates}/spacer.gif" width="1" height="1"/>
											</td>
										</tr>-->
									</table>
								</xsl:if>
								<table class="company_detail" cellspacing="1" cellpadding="1" width="100%">
									<!--<xsl:choose>
										<xsl:when test="position() = 1">
											<tr bgcolor="{$header_bg_color}">
												<td height="18" width="25%">
													<font class="listtitle">&#160;Company name&#160;/</font>
													<font class="listtitle">Address&#160;</font>
												</td>
												<td align="left" colspan="2" width="25%">
													<nobr>
														<font class="listtitle">Contact Information</font>
													</nobr>
												</td>
											</tr>
										</xsl:when>
										<xsl:otherwise>
											<tr bgcolor="#C0C0C0">
												<td height="18" width="25%">
													<font class="listtitle">&#160;Company name&#160;/</font>
													<font class="listtitle">Address&#160;</font>
												</td>
												<td align="left" colspan="2" width="25%">
													<nobr>
														<font class="listtitle">Contact Information</font>
													</nobr>
												</td>
											</tr>
										</xsl:otherwise>
									</xsl:choose> -->
									<tr valign="top">
										<td align="left" height="18" class="normaltext">
											<!--<a href="http://www.yachtcouncil.com/as_{col[@name='association']}.asp">
												<font color="{$color_main_first1}">
													Association&#160;<xsl:value-of select="col[@name='association']" disable-output-escaping="yes"/>
												</font>
											</a>
											<br/>-->
											<!--<b><xsl:value-of select="col[@name='name']"/></b><br/>-->
											<xsl:if test="normalize-space(col[@name='address'])">
												<nobr>
													<xsl:value-of select="col[@name='address']" disable-output-escaping="no"/><br/>
												</nobr>
											</xsl:if>
											<xsl:value-of select="col[@name='city']" disable-output-escaping="yes"/>
											<xsl:if test="normalize-space(col[@name='state'])"><nobr>,&#160;<xsl:value-of select="col[@name='state']" disable-output-escaping="yes"/></nobr></xsl:if>
											&#160;<xsl:value-of select="col[@name='zipcode']" disable-output-escaping="yes"/>
											<br/>
											<xsl:value-of select="col[@name='country']" disable-output-escaping="yes"/>&#160;
											<xsl:if test="normalize-space(col[@name='phone1'])">
												<br/>
												<nobr>
													<font class="titleblack">Phone:</font>&#160;
													<xsl:value-of select="col[@name='phone1']" disable-output-escaping="yes"/>
												</nobr>
												<xsl:if test="string-length(col[@name='phone1_ext'])>0">
													<br/>
													<nobr>
														&#160;ext.:&#160;<xsl:value-of select="col[@name='phone1_ext']" disable-output-escaping="yes"/>
													</nobr>
												</xsl:if>
											</xsl:if>
											<xsl:if test="normalize-space(col[@name='fax'])">
												<br/>
												<nobr>
													<font class="titleblack">Fax:</font>
													&#160;<xsl:value-of select="col[@name='fax']" disable-output-escaping="yes"/>
												</nobr>										
											</xsl:if>		
											<xsl:if test="normalize-space(col[@name='URL'])">
												<br/>
												<nobr>
													<font class="titleblack">Web:</font>&#160;
													<a target="_blank"><xsl:attribute name="href"><xsl:call-template name="make_url"><xsl:with-param name="url" select="col[@name='URL']"/></xsl:call-template></xsl:attribute><xsl:value-of select="col[@name='URL']" disable-output-escaping="yes"/></a>
												</nobr>										
											</xsl:if>			
										</td>
										<!--<td valign="top">
											<table class="company_detail" cellspacing="2" cellpadding="0" width="100%">
									 			<tr>
													<td valign="top" class="normaltext">
														<xsl:if test="normalize-space(col[@name='principle_name'])">
															<font class="titleblack">Principal:</font>&#160;<br/>
														</xsl:if>
													</td>
													<td>
														<nobr>
															<xsl:if test="normalize-space(col[@name='principle_name'])">
																<xsl:value-of select="col[@name='principle_name']" disable-output-escaping="yes"/>
																<br/>
															</xsl:if>
														</nobr>
													</td>
												</tr> 
												<tr>
													<td valign="top" class="normaltext">
														<xsl:if test="normalize-space(col[@name='admin_name'])">
															<font class="titleblack">Admin:</font>&#160;<br/>
														</xsl:if>
													</td>
													<td>
														<xsl:if test="normalize-space(col[@name='admin_name'])">
															<xsl:value-of select="col[@name='admin_name']" disable-output-escaping="yes"/><br/>
														</xsl:if>
													</td>
												</tr> 
												<tr>
													<td valign="top" class="normaltext">
														<xsl:if test="normalize-space(col[@name='phone1'])">
															<font class="titleblack">Phone:</font>&#160;
														</xsl:if>
													</td>
													<td>
														<nobr>
															<xsl:if test="normalize-space(col[@name='phone1'])">
																<xsl:value-of select="col[@name='phone1']" disable-output-escaping="yes"/>
															</xsl:if>
														</nobr>
														<nobr>
															<xsl:if test="string-length(col[@name='phone1_ext'])>0">
																<br/>&#160;ext.:&#160;<xsl:value-of select="col[@name='phone1_ext']" disable-output-escaping="yes"/>
															</xsl:if>
														</nobr>
													</td>
												</tr>
												<xsl:if test="string-length(col[@name='phone1_ext'])>0">
													<tr>
														<td valign="top" class="normaltext">
															<font class="titleblack">ext.:&#160;</font>
														</td>
														<td>
															<xsl:value-of select="col[@name='phone1_ext']" disable-output-escaping="yes"/>
														</td>
													</tr>
												</xsl:if>
												<tr>
													<td valign="top" class="normaltext">
														<xsl:if test="normalize-space(col[@name='fax'])">
															<font class="titleblack">Fax:</font>&#160;<br/>
														</xsl:if>
													</td>
													<td>
														<xsl:if test="normalize-space(col[@name='fax'])">
															<xsl:value-of select="col[@name='fax']" disable-output-escaping="yes"/><br/>
														</xsl:if>
													</td>
												</tr>
											</table>
										</td>-->
									</tr>
								</table>
							</td>
						</xsl:for-each>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</xsl:template>

<xsl:template name="compan_info_vert">
	<xsl:variable name="col_count" select="//page/rowset[@id='company_info']/metadata/column-count"/>
	<!--<h3 style="margin: 0;" align="left"><xsl:value-of select="//page/rowset/data/row/col[@name='name']"/></h3>-->
	<hr width="100%" size="1" noshade="true" color="{$header_bg_color}"/>
	<table align="center" width="100%" cellspacing="2" cellpadding="2">
		<tr>
			<td>
				<table class="company_detail" cellspacing="6" cellpadding="2" border="0" align="center">
					<tr>
						<xsl:for-each select="//page/rowset[@id='company_info']/data/row">
							<xsl:variable name="rowId" select="col[1]"/>
							<xsl:if test="position() mod 3 = 1">
								<xsl:text disable-output-escaping="yes"><![CDATA[</tr><tr>]]></xsl:text>
							</xsl:if> 
							<td valign="top">
								<xsl:if test="position() >=2">
									<table cellspacing="0" cellpadding="0" width="100%">
										<tr>
											<td>
												<nobr>
													<font class="flocation" color="{$color_main_first1}">
														<b>
															<xsl:if test="normalize-space(col[@name='city'])"><xsl:value-of select="col[@name='city']" disable-output-escaping="no"/>&#160;</xsl:if>Location
														</b>
													</font>
												</nobr>
											</td>
										</tr>
										<!--<tr>
											<td bgcolor="{$header_bg_color}" height="1">
												<img src="{$img_path_templates}/spacer.gif" width="1" height="1"/>
											</td>
										</tr>-->
									</table>
								</xsl:if>
								<xsl:if test="position() =1">
									<table cellspacing="0" cellpadding="0" width="100%">
										<tr>
											<td>
												<nobr>
													<font class="flocation" color="{$color_main_first1}">
														<b>
															<xsl:if test="normalize-space(col[@name='city'])"><xsl:value-of select="col[@name='city']" disable-output-escaping="no"/>&#160;</xsl:if>Location
														</b>
													</font>
												</nobr>
											</td>
										</tr>
										<!--<tr>
											<td bgcolor="{$header_bg_color}" height="1">
												<img src="{$img_path_templates}/spacer.gif" width="1" height="1"/>
											</td>
										</tr>-->
									</table>
								</xsl:if>
								<table class="company_detail" cellspacing="1" cellpadding="1" width="100%">
									<!--<xsl:choose>
										<xsl:when test="position() = 1">
											<tr bgcolor="{$header_bg_color}">
												<td height="18" width="25%">
													<font class="listtitle">&#160;Company name&#160;/</font>
													<font class="listtitle">Address&#160;</font>
												</td>
												<td align="left" colspan="2" width="25%">
													<nobr>
														<font class="listtitle">Contact Information</font>
													</nobr>
												</td>
											</tr>
										</xsl:when>
										<xsl:otherwise>
											<tr bgcolor="#C0C0C0">
												<td height="18" width="25%">
													<font class="listtitle">&#160;Company name&#160;/</font>
													<font class="listtitle">Address&#160;</font>
												</td>
												<td align="left" colspan="2" width="25%">
													<nobr>
														<font class="listtitle">Contact Information</font>
													</nobr>
												</td>
											</tr>
										</xsl:otherwise>
									</xsl:choose>-->
									<tr valign="top">
										<td align="left" height="18" class="normaltext">
											<!--<a href="http://www.yachtcouncil.com/as_{col[@name='association']}.asp">
												<font color="{$color_main_first1}">
													Association&#160;
													<xsl:value-of select="col[@name='association']" disable-output-escaping="yes"/>
												</font>
											</a>
											<br/>-->
											<!--<b><xsl:value-of select="col[@name='name']"/></b><br/>-->
											<xsl:if test="normalize-space(col[@name='address'])">
												<nobr>
													<xsl:value-of select="col[@name='address']" disable-output-escaping="no"/>
													<br/>
												</nobr>
											</xsl:if>
											<xsl:value-of select="col[@name='city']" disable-output-escaping="yes"/>
											<xsl:if test="normalize-space(col[@name='state'])"><nobr>,&#160;<xsl:value-of select="col[@name='state']" disable-output-escaping="yes"/></nobr></xsl:if>
											&#160;<xsl:value-of select="col[@name='zipcode']" disable-output-escaping="yes"/>
											<br/>
											<xsl:value-of select="col[@name='country']" disable-output-escaping="yes"/>&#160;
											<xsl:if test="normalize-space(col[@name='phone1'])">
												<br/>
												<nobr>
													<font class="titleblack">Phone:</font>&#160;
													<xsl:value-of select="col[@name='phone1']" disable-output-escaping="yes"/>
												</nobr>
												<xsl:if test="string-length(col[@name='phone1_ext'])>0">
													<br/>
													<nobr>
														&#160;ext.:&#160;<xsl:value-of select="col[@name='phone1_ext']" disable-output-escaping="yes"/>
													</nobr>
												</xsl:if>
											</xsl:if>
											<xsl:if test="normalize-space(col[@name='fax'])">
												<br/>
												<nobr>
													<font class="titleblack">Fax:</font>&#160;
													<xsl:value-of select="col[@name='fax']" disable-output-escaping="yes"/>
												</nobr>										
											</xsl:if>		
											<xsl:if test="normalize-space(col[@name='URL'])">
												<br/>
												<nobr>
													<font class="titleblack">Web:</font>&#160;
<a target="_blank"><xsl:attribute name="href"><xsl:call-template name="make_url"><xsl:with-param name="url" select="col[@name='URL']"/></xsl:call-template></xsl:attribute><xsl:value-of select="col[@name='URL']" disable-output-escaping="yes"/></a>
													
												</nobr>										
											</xsl:if>			
										</td>
										<!--<td valign="top">
											<table class="company_detail" cellspacing="2" cellpadding="0" width="100%">
									 			<tr>
													<td valign="top" class="normaltext">
														<xsl:if test="normalize-space(col[@name='principle_name'])">
															<font class="titleblack">Principal:</font>&#160;<br/>
														</xsl:if>
													</td>
													<td>
														<nobr>
															<xsl:if test="normalize-space(col[@name='principle_name'])">
																<xsl:value-of select="col[@name='principle_name']" disable-output-escaping="yes"/><br/>
															</xsl:if>
														</nobr>
													</td>
												</tr>
												<tr>
													<td valign="top" class="normaltext">
														<xsl:if test="normalize-space(col[@name='admin_name'])">
															<font class="titleblack">Admin:</font>&#160;<br/>
														</xsl:if>
													</td>
													<td>
														<xsl:if test="normalize-space(col[@name='admin_name'])">
															<xsl:value-of select="col[@name='admin_name']" disable-output-escaping="yes"/><br/>
														</xsl:if>
													</td>
												</tr>
												<tr>
													<td valign="top" class="normaltext">
														<xsl:if test="normalize-space(col[@name='phone1'])">
															<font class="titleblack">Phone:</font>&#160;
														</xsl:if>
													</td>
													<td>
														<nobr>
															<xsl:if test="normalize-space(col[@name='phone1'])">
																<xsl:value-of select="col[@name='phone1']" disable-output-escaping="yes"/>
															</xsl:if>
														</nobr>
														<nobr>
															<xsl:if test="string-length(col[@name='phone1_ext'])>0">
																<br/>&#160;ext.:&#160;<xsl:value-of select="col[@name='phone1_ext']" disable-output-escaping="yes"/>
															</xsl:if>
														</nobr>
													</td>
												</tr>
												<xsl:if test="string-length(col[@name='phone1_ext'])>0">
													<tr>
														<td valign="top" class="normaltext">
															<font class="titleblack">ext.:&#160;</font>
														</td>
														<td>
															<xsl:value-of select="col[@name='phone1_ext']" disable-output-escaping="yes"/>
														</td>
													</tr>
												</xsl:if>
												<tr>
													<td valign="top" class="normaltext">
														<xsl:if test="normalize-space(col[@name='fax'])">
															<font class="titleblack">Fax:</font>&#160;<br/>
														</xsl:if>
													</td>
													<td>
														<xsl:if test="normalize-space(col[@name='fax'])">
															<xsl:value-of select="col[@name='fax']" disable-output-escaping="yes"/><br/>
														</xsl:if>
													</td>
												</tr>
											</table>
										</td>-->
									</tr>
								</table>
							</td>
						</xsl:for-each>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</xsl:template>

<xsl:template name="contacts">
	<xsl:if test="normalize-space(col[@name='phone_work'])">
		<nobr>
			<font class="titleblack">Work phone:</font>
			<xsl:value-of select="col[@name='phone_work']"/>
		</nobr>
		<br/>
	</xsl:if>
	<xsl:if test="normalize-space(col[@name='phone_home'])">
		<nobr>
			<font class="titleblack">Home phone:</font>
			<xsl:value-of select="col[@name='phone_home']"/>
		</nobr>
		<br/>
	</xsl:if>
	<xsl:if test="normalize-space(col[@name='phone_cell'])">
		<nobr>
			<font class="titleblack">Cell phone:</font>
			<xsl:value-of select="col[@name='phone_cell']"/>
		</nobr>
		<br/>
	</xsl:if>
	<xsl:if test="normalize-space(col[@name='fax'])">
		<nobr>
			<font class="titleblack">Fax:</font>
			<xsl:value-of select="col[@name='fax']"/>
		</nobr>
		<br/>
	</xsl:if>
	<xsl:if test="normalize-space(col[@name='email'])">
		<nobr>
			<font class="titleblack">Email:</font>
			<xsl:value-of select="col[@name='email']"/>
		</nobr>
	</xsl:if>
</xsl:template>

<xsl:template name="address">
	<xsl:variable name="address">
		<xsl:if test="normalize-space(col[@name='address'])">
			<xsl:value-of select="concat(col[@name='address'],', ')"/>
		</xsl:if>
		<xsl:if test="normalize-space(col[@name='city'])">
			<xsl:value-of select="concat(col[@name='city'],', ')"/>
		</xsl:if>
		<xsl:if test="normalize-space(col[@name='state'])">
			<xsl:value-of select="concat(col[@name='state'],', ')"/>
		</xsl:if>
		<xsl:if test="normalize-space(col[@name='country'])">
			<xsl:value-of select="concat(col[@name='country'],', ')"/>
		</xsl:if>
	</xsl:variable>
	<xsl:if test="substring($address, string-length($address)-1, string-length($address)) = ', '">
		<xsl:value-of select="substring($address,1,string-length($address)-2)"/>
	</xsl:if>
	<xsl:if test="not(substring($address, string-length($address)-1, string-length($address)) = ', ')">
		<xsl:value-of select="$address"/>
	</xsl:if>
</xsl:template>

</xsl:stylesheet>
